﻿using System;
using System.Text;
using System.Drawing;
using System.Buffers;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;

public static partial class glDRIVE
{
    /*
    X平方分布函数
    
    x：自变量值。
    n：自由度。
    返回X平方分布函数值。
    */

    public static string drive_chii()
    {
        int n;
        double t, y;
        StringBuilder sb = new StringBuilder();
        for (n = 1; n <= 5; n++)
        {
            t = 0.5; y = gl.chii(t, n);
            sb.AppendLine("P(" + t + ", " + n + ")=" + y + "<br>");
            t = 5.0; y = gl.chii(t, n);
            sb.AppendLine("P(" + t + ", " + n + ")=" + y + "<br>");
        }
        return sb.ToString();
    }
}